home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(load){
- timer = 0;
- rv = random(40);
- if(String(_name) != "kartus")
- {
- cannonLength = 10;
- turretpoint = _parent.tank._rotation + _parent.tank.turret._rotation + 90;
- angle = turretpoint / 360 * 2 * 3.141592653589793;
- xcomponent = cannonLength * Math.sin(angle);
- ycomponent = (- cannonLength) * Math.cos(angle);
- _X = xcomponent + _parent.tank._x;
- _Y = ycomponent + _parent.tank._y;
- xmove = xcomponent / cannonLength * 10;
- ymove = ycomponent / cannonLength * 10;
- this._rotation = turretpoint - 90;
- }
- }
-